Repository navigation
feat(ajm): decode Opus mapping family 255 with several channels - #5517
Merged
oneandonlydean merged 2 commits intoOct 14, 2026
Merged
oneandonlydean merged 2 commits into
oneandonlydean merged 2 commits into
Conversation
Co-authored-by: poonasor <12569806+poonasor@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A family 255 instance with more than one channel carries no stream count or mapping in its initialization words, so its decoder now opens on the first packet: the multistream packet's self-delimited streams are counted (RFC 6716 appendix B), each stream's TOC stereo flag marks it as coupled, and the channels map in order. A packet whose streams do not make the channel count throws. Metal Gear Solid 4 Master Collection (PPSA18194) initializes a 4-channel family 255 decoder for its intro movie. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
3 tasks done
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #5075: this branch is built on its head
485f638a5; only the last commit belongs to this PR.What
#5075 accepts Opus mapping family 255 for one channel. Metal Gear Solid 4 initializes its intro movie's decoder with
4, 48000, 255(12 bytes, nothing after the family), so the stream count and channel mapping that family 255 needs (RFC 7845 §5.1.1) are not in the initialization words.OpusHeadwith that layout.Tested
Windows 11, RTX 3080, WinLibs GCC 15.2.0 r7, Release.
guest_ajmgainsTestOpusMultistreamFamily255. fix(ajm): accept Opus mapping family 255 for a mono stream #5075's test packets are stereo, so each is turned into a two-stream packet (a self-delimited copy followed by the packet). A4, 48000, 255instance must then decode it to four channels, both pairs sample-equal to a2, 48000, 0decode of the original, with the full input consumed. fix(ajm): accept Opus mapping family 255 for a mono stream #5075's refusal of2, 48000, 255is replaced by this;1, 48000, 2is still refused. Without the change the test aborts (0xc0000409); with it, it passes.check_conventions.py --base origin/mainpasses.sceAjmBatchJobInitialize (Opus mapping family ...) not implemented. With this (plus feat(libSceNet): implement sceNetResolverStartNtoa6 #5411, feat(libSceAppContent): export sceAppContentAddcontDelete #5514, feat(libSceCesCs): convert EUC-JP (CP51932) strings through a profile context #5515, feat(libSceCesCs): build libSceCesCs-module from the libSceCesCs source #5425) it plays with sound, and the game reaches gameplay (about 3 fps).Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository🤖 Generated with Claude Code